<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app"></div>
</body>
<script src="../js/task3.js">
    //原型方法排重
    //var arr=[5,4,26,9,4,8,5,14]；
    Array.prototype.ex = function () {
        let arr1 = []
        for (let i = 0; i < this.length; i++) {
            if (arr1.indexOf(this[i]) === -1) {
                arr1.push(this[i])
            }
        }
        return arr1
    }
    let arr = [5, 4, 26, 9, 4, 8, 5, 14]
    console.log(arr.ex())
</script>

</html>